package com.itheima.mapper;


import com.itheima.pojo.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserMapper {

    User findByUsername(@Param("username") String username);

    User findUsername(@Param("username") String username);

    List<User> queryAllUser(@Param("queryString") String queryString);

    void addUser(User user);

    void addUserIdAndRoleId(@Param("roleIds") Integer[] roleIds, @Param("id") Integer id);

    Integer[] queryRoleIdsByUserId(@Param("userId") Integer userId);

    void updateUsers(User user);

    void deleteRoleIdByUserId(@Param("id") Integer id);

    void deleteUserById(@Param("id") Integer id);
}
